﻿using System;
using System.Collections.Generic;
using System.Text;
using wojilu.Web.Mvc;
using wojilu.Web;
using wojilu.cms.Domain;

namespace wojilu.cms.Controller.Admin
{
    public class LeftController : ControllerBase
    {
        public LeftController()
        {
            HideLayout(typeof(LayoutController));
        }

        public void Show(int id)
        {
            List<Left> list = cdb.findBy<Left>("Category", id);
            IBlock block = getBlock("list");
            foreach (Left a in list)
            {
                block.Set("a.Title", strUtil.CutString(a.Name, 15));
                block.Set("a.lnkRight", a.URL);

                block.Next();
            }
        }
    }
}
